/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#ifndef _LUASCRIPT_H_
#define _LUASCRIPT_H_

#include "IScript.h"
#include <string>

extern "C" 
{
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
};

class LuaScript : public IScript
{
private:
	lua_State * _luaState;
private:
	void initializeEngine();
	void closeEngine();
public:
	LuaScript();
	virtual ~LuaScript();
	virtual bool createFromFile(const char * path);
	virtual bool createFromString(const char * code);
	virtual bool run();
	virtual bool run(const char * functionName, ScriptArgument * arguments);
	virtual bool registerFunction(const char * functionName, void * function);
};

#endif